<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<link rel="icon"
	href="./js/hai/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="./js/hai/jquery-1.8.3.min.js"></script>
<script src="./js/hai/highcharts.js"></script>
<script src="./js/hai/exporting.js"></script>
<script	src="./js/hai/highcharts-zh_CN.js"></script>

</head>
<body>

	<div id="container" style="min-width: 400px; height: 800px"></div>

<script>
    $(function(){
		//报表开始
		$.getJSON("/getWeatherList",{},function (res) {
		   var chart = Highcharts
			.chart(
					'container',
					{
						chart : {
							type : 'spline'
						},
						title : {
							text : '长沙市橘子洲气温'
						},
						subtitle : {
							text : '数据来源: 数据采集'
						},
						xAxis : {
							categories : res.cellNames,
							title : {
								text : null
							}
						},
						yAxis : {
							min : 0,
							title : {
								text : '温度 (°C)',
								align : 'high'
							},
							labels : {
								overflow : 'justify'
							}
						},
						tooltip : {
							valueSuffix : ' °C'
						},
						plotOptions : {
							bar : {
								dataLabels : {
									enabled : true,
									allowOverlap : true
									// 允许数据标签重叠
								}
							}
						},
						legend : {
							layout : 'vertical',
							align : 'right',
							verticalAlign : 'top',
							x : -40,
							y : 100,
							floating : true,
							borderWidth : 1,
							backgroundColor : ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
							shadow : true
						},
						series :  [
							{
								"color" : "#ff9966",
								"data" :res.cellValues,

								"name" : "气温"
							}]
					});
		   //报表结束
		})
    });	
</script>
</body>
</html>